<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>Hello MUI</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<link rel="stylesheet" href="../css/mui.min.css">
		<script src="../js/mui.min.js"></script>
		<script src="../js/app.js"></script>
		<style>
			html,body {
				background-color: #efeff4;
			}
		</style>
		<script>
			mui.init();
		</script>
	</head>

	<body>

<style>
	.mui-popover {
		top: 125px;
	}
</style>
<header class="mui-bar mui-bar-nav">
	<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
	<h1 class="mui-title">Popovers</h1>
</header>
<div class="mui-content">
	<div class="mui-content-padded">
		<a id="openPopover" class="mui-btn mui-btn-primary mui-btn-block">Open Popover</a>
	</div>
	<div id="popover" class="mui-popover">
		<div class="mui-content-padded">
			<a id="closePopover" class="mui-btn mui-btn-primary mui-btn-block">Close Popover</a> 
		</div>
		<ul class="mui-table-view">
			<li class="mui-table-view-cell"><a href="#">Item1</a>
			</li>
			<li class="mui-table-view-cell"><a href="#">Item2</a>
			</li>
			<li class="mui-table-view-cell"><a href="#">Item3</a>
			</li>
			<li class="mui-table-view-cell"><a href="#">Item4</a>
			</li>
			<li class="mui-table-view-cell"><a href="#">Item5</a>
			</li>
			<li class="mui-table-view-cell"><a href="#">Item6</a>
			</li>
			<li class="mui-table-view-cell"><a href="#">Item7</a>
			</li>
			<li class="mui-table-view-cell"><a href="#">Item8</a>
			</li>
			<li class="mui-table-view-cell"><a href="#">Item9</a>
			</li>
			<li class="mui-table-view-cell"><a href="#">Item10</a>
			</li>
		</ul>
	</div>
</div>
<script>
	document.getElementById('openPopover').addEventListener('tap', function() {
		mui('#popover').popover('show', {
			left: 100,
			right: 200
		});
		//$('#popover').popover('toggle');//也可以直接调用toggle。该方法自动识别是显示还是隐藏
	});
	document.getElementById('closePopover').addEventListener('tap', function() {
		mui('#popover').popover('hide');
		//$('#popover').popover('toggle');//也可以直接调用toggle。该方法自动识别是显示还是隐藏
	});
</script>

</body>
</html>